home *** CD-ROM | disk | FTP | other *** search
/ Aminet 7 / Aminet 7 - August 1995.iso / Aminet / docs / misc / ConcNews.lha / news / amiga.compilers / comp.sys.amiga.programmer_24271_000006.msg < prev    next >
Encoding:
Internet Message Format  |  1994-11-27  |  3.0 KB

  1. Path: etek.chalmers.se!chalmers.se!sunic!mcsun!uunet!cs.utexas.edu!zaphod.mps.ohio-state.edu!howland.reston.ans.net!paladin.american.edu!gatech!concert!rutgers!cbmvax!peter
  2. From: peter@cbmvax.commodore.com (Peter Cherna)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: SASC 6.1 Wrong Protos
  5. Message-ID: <38281@cbmvax.commodore.com>
  6. Date: 4 Jan 93 20:30:06 GMT
  7. References: <1993Jan4.091145.1581@ghost.dsi.unimi.it>
  8. Reply-To: peter@cbmvax.commodore.com (Peter Cherna)
  9. Organization: Commodore-Amiga, Inc.  West Chester, PA.
  10. Lines: 56
  11.  
  12. In article <1993Jan4.091145.1581@ghost.dsi.unimi.it> labenrsa@ICIL64.CILEA.IT writes:
  13. >Hullo,
  14. >
  15. >Has anyone noticed that the protos for the BOOPSI method functions
  16. >distributed with SASC (as of patch 6.1) are wrong?
  17. >
  18. >The Msg argument is referred to as Msg *msg, which is incorrect,
  19. >since Msg is already typedef'ed as a pointer. The most recent
  20. >AutoDocs from CBM I have show  this clearly.
  21.  
  22. That was my typo in the Commodore prototypes (since fixed), which
  23. SAS licenses and supplies.  The autodocs have been right since
  24. they were written.
  25.  
  26. >And, by the way, either the proto or a pragma file somewhere should
  27. >mention that these functions are __stdargs, or somebody should provide
  28. >a double-standard amiga.lib (like the 6.X standard libraries).
  29.  
  30. This would be a prototype change.  It couldn't be a pragma, since
  31. these functions are in a linked library, and pragmas bind to
  32. shared-library functions.
  33.  
  34. >And oh, it seems that the 6.1 Amiga.lib has no HookEntry(), and
  35. >maybe none of the shorthands for BOOPSI methods mentioned in
  36. >AmigaMail and BOOPSI examples that are floating around (DM, DSM).
  37.  
  38. The original Boopsi examples used functions like DM() and DSM(),
  39. before these functions were added to amiga.lib.  When we added them to
  40. amiga.lib, we opted for the more clear names (eg., DoMethod() and
  41. DoSuperMethod()).  The autodocs for those functions mention the old
  42. names.
  43.  
  44. HookEntry() is in amiga.lib.  The purpose of HookEntry() is to
  45. convert the hook call (which passes arguments in registers) to a
  46. stack-based call for use with the standard C calling convention of
  47. stack-based arguments.  Hence, HookEntry() is called _HookEntry in
  48. amiga.lib, since a pre-pended underscore signifies a standard
  49. function.  (Note that while HookEntry() actually takes its parameters
  50. in registers, it's never called from C, but is used by stdargs C
  51. programs, so the use of the underscore may be confusing, but it is
  52. necessary).  If you're compiling with registerized arguments, you
  53. don't need a HookEntry() function.  Just have the hook jump directly
  54. to your code, using explicit registers for parameters (__asm and
  55. __register).
  56.  
  57. If the linker is complaining that it can't find @HookEntry, this
  58. is the problem.  (@ is prepended to regargs functions).
  59.  
  60. >                    Andy
  61.  
  62.      Peter
  63. --
  64. Peter Cherna, User Interface Development Group, Commodore-Amiga, Inc.
  65. {uunet|rutgers}!cbmvax!peter    peter@cbmvax.commodore.com
  66. My opinions do not necessarily represent the opinions of my employer.
  67. "Opinions enlarged to show detail"